/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.gruposp2p.aula.gwt.client.model;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @author jj
 */

public class Absence implements Serializable {
    private static final long serialVersionUID = 1L;

    private Integer id;

    private Date date;
    private String description;
    private Serializable justified;
    private Student studentId;
    private Subject subjectId;

    public Absence() {
    }

    public Absence(Integer id) {
        this.id = id;
    }

    public Absence(Integer id, Date date, Serializable justified) {
        this.id = id;
        this.date = date;
        this.justified = justified;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Serializable getJustified() {
        return justified;
    }

    public void setJustified(Serializable justified) {
        this.justified = justified;
    }

    public Student getStudentId() {
        return studentId;
    }

    public void setStudentId(Student studentId) {
        this.studentId = studentId;
    }

    public Subject getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(Subject subjectId) {
        this.subjectId = subjectId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Absence)) {
            return false;
        }
        Absence other = (Absence) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.aula.databasemodel.entity.Absence[id=" + id + "]";
    }

}
